<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>FLAC: FLAC/metadata.h: metadata level 0 interface</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">FLAC
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">Free Lossless Audio Codec</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#groups">Modules</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">FLAC/metadata.h: metadata level 0 interface<div class="ingroups"><a class="el" href="group__flac.html">FLAC C API</a> &raquo; <a class="el" href="group__flac__metadata.html">FLAC/metadata.h: metadata interfaces</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__flac__metadata__level1"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level1.html">FLAC/metadata.h: metadata level 1 interface</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga804b42d9da714199b4b383ce51078d51"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga804b42d9da714199b4b383ce51078d51">FLAC__metadata_get_streaminfo</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *streaminfo)</td></tr>
<tr class="separator:ga804b42d9da714199b4b383ce51078d51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga1626af09cd39d4fa37d5b46ebe3790fd">FLAC__metadata_get_tags</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **tags)</td></tr>
<tr class="separator:ga1626af09cd39d4fa37d5b46ebe3790fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0f47949dca514506718276205a4fae0b"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#ga0f47949dca514506718276205a4fae0b">FLAC__metadata_get_cuesheet</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **cuesheet)</td></tr>
<tr class="separator:ga0f47949dca514506718276205a4fae0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab9f69e48c5a33cacb924d13986bfb852"><td class="memItemLeft" align="right" valign="top">FLAC__bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__flac__metadata__level0.html#gab9f69e48c5a33cacb924d13986bfb852">FLAC__metadata_get_picture</a> (const char *filename, <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **picture, <a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a> type, const char *mime_type, const FLAC__byte *description, uint32_t max_width, uint32_t max_height, uint32_t max_depth, uint32_t max_colors)</td></tr>
<tr class="separator:gab9f69e48c5a33cacb924d13986bfb852"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>The level 0 interface consists of individual routines to read the STREAMINFO, VORBIS_COMMENT, CUESHEET, and PICTURE blocks, requiring only a filename. </p>
<p>On Windows, filename must be a UTF-8 encoded filename, which libFLAC internally translates to an appropriate representation to use with _wfopen. On all other systems, filename is passed to fopen without any translation.</p>
<p>They try to skip any ID3v2 tag at the head of the file. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga804b42d9da714199b4b383ce51078d51"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga804b42d9da714199b4b383ce51078d51">&#9670;&nbsp;</a></span>FLAC__metadata_get_streaminfo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_get_streaminfo </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> *&#160;</td>
          <td class="paramname"><em>streaminfo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the STREAMINFO metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td class="paramname">streaminfo</td><td>A pointer to space for the STREAMINFO block. Since <a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> is a simple structure with no memory allocation involved, you pass the address of an existing structure. It need not be initialized. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line">streaminfo != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid STREAMINFO block was read from <em>filename</em>. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no STREAMINFO block. (A memory allocation error is possible because this function must set up a file decoder.) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga1626af09cd39d4fa37d5b46ebe3790fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga1626af09cd39d4fa37d5b46ebe3790fd">&#9670;&nbsp;</a></span>FLAC__metadata_get_tags()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_get_tags </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
          <td class="paramname"><em>tags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the VORBIS_COMMENT metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td class="paramname">tags</td><td>The address where the returned pointer will be stored. The <em>tags</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line">tags != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid VORBIS_COMMENT block was read from <em>filename</em>, and <em>*tags</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no VORBIS_COMMENT block, and <em>*tags</em> will be set to <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga0f47949dca514506718276205a4fae0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0f47949dca514506718276205a4fae0b">&#9670;&nbsp;</a></span>FLAC__metadata_get_cuesheet()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_get_cuesheet </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
          <td class="paramname"><em>cuesheet</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read the CUESHEET metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td class="paramname">cuesheet</td><td>The address where the returned pointer will be stored. The <em>cuesheet</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line">cuesheet != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid CUESHEET block was read from <em>filename</em>, and <em>*cuesheet</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no CUESHEET block, and <em>*cuesheet</em> will be set to <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab9f69e48c5a33cacb924d13986bfb852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab9f69e48c5a33cacb924d13986bfb852">&#9670;&nbsp;</a></span>FLAC__metadata_get_picture()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FLAC__bool FLAC__metadata_get_picture </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structFLAC____StreamMetadata.html">FLAC__StreamMetadata</a> **&#160;</td>
          <td class="paramname"><em>picture</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__flac__format.html#gaf6d3e836cee023e0b8d897f1fdc9825d">FLAC__StreamMetadata_Picture_Type</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>mime_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const FLAC__byte *&#160;</td>
          <td class="paramname"><em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>max_width</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>max_height</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>max_depth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>max_colors</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Read a PICTURE metadata block of the given FLAC file. This function will try to skip any ID3v2 tag at the head of the file. Since there can be more than one PICTURE block in a file, this function takes a number of parameters that act as constraints to the search. The PICTURE block with the largest area matching all the constraints will be returned, or <em>*picture</em> will be set to <code>NULL</code> if there was no such block.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">filename</td><td>The path to the FLAC file to read. </td></tr>
    <tr><td class="paramname">picture</td><td>The address where the returned pointer will be stored. The <em>picture</em> object must be deleted by the caller using <a class="el" href="group__flac__metadata__object.html#ga6b3159744a1e5c4ce9d349fd0ebae800">FLAC__metadata_object_delete()</a>. </td></tr>
    <tr><td class="paramname">type</td><td>The desired picture type. Use <code>-1</code> to mean "any type". </td></tr>
    <tr><td class="paramname">mime_type</td><td>The desired MIME type, e.g. "image/jpeg". The string will be matched exactly. Use <code>NULL</code> to mean "any MIME type". </td></tr>
    <tr><td class="paramname">description</td><td>The desired description. The string will be matched exactly. Use <code>NULL</code> to mean "any
                   description". </td></tr>
    <tr><td class="paramname">max_width</td><td>The maximum width in pixels desired. Use <code></code>(uint32_t)(-1) to mean "any width". </td></tr>
    <tr><td class="paramname">max_height</td><td>The maximum height in pixels desired. Use <code></code>(uint32_t)(-1) to mean "any height". </td></tr>
    <tr><td class="paramname">max_depth</td><td>The maximum color depth in bits-per-pixel desired. Use <code></code>(uint32_t)(-1) to mean "any depth". </td></tr>
    <tr><td class="paramname">max_colors</td><td>The maximum number of colors desired. Use <code></code>(uint32_t)(-1) to mean "any number of colors". </td></tr>
  </table>
  </dd>
</dl>
<dl class="section user"><dt>Assertions:</dt><dd><div class="fragment"><div class="line">filename != NULL </div>
</div><!-- fragment --> <div class="fragment"><div class="line">picture != NULL </div>
</div><!-- fragment --> </dd></dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">FLAC__bool</td><td><code>true</code> if a valid PICTURE block was read from <em>filename</em>, and <em>*picture</em> will be set to the address of the metadata structure. Returns <code>false</code> if there was a memory allocation error, a file decoder error, or the file contained no PICTURE block, and <em>*picture</em> will be set to <code>NULL</code>. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->

<hr size="1"/>
Copyright (c) 2000-2009  Josh Coalson
Copyright (c) 2011-2023  Xiph.Org Foundation
<!-- Copyright (c) 2000-2009  Josh Coalson -->
<!-- Copyright (c) 2011-2023  Xiph.Org Foundation -->
<!-- Permission is granted to copy, distribute and/or modify this document -->
<!-- under the terms of the GNU Free Documentation License, Version 1.1 -->
<!-- or any later version published by the Free Software Foundation; -->
<!-- with no invariant sections. -->
<!-- A copy of the license can be found at http://www.gnu.org/copyleft/fdl.html -->
</body>
</html>
